//
//  BKClassifySearchNoResultView.m
//  bestkeep
//
//  Created by utouu_mhm on 16/12/14.
//  Copyright © 2016年 utouu. All rights reserved.
//

#import "BKClassifySearchNoResultView.h"

#define RGB(r,g,b) [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:1]

@interface BKClassifySearchNoResultView ()

@property (nonatomic,strong)UILabel * tipLabel;
@property (nonatomic,strong)UIImageView * tipImgV;

@end


@implementation BKClassifySearchNoResultView

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        [self setUpView];
    }
    return self;
}


-(void)setUpView
{
    _tipLabel =[[UILabel alloc]initWithFrame:CGRectMake(10, self.frame.size.height/2, ScreenWidth-20, 30)];
    _tipLabel.textAlignment=NSTextAlignmentCenter;
    _tipLabel.font=[UIFont systemFontOfSize:17];
    _tipLabel.text=@"对不起，没有找到您要的商品~";
    _tipLabel.textColor=RGB(153, 153, 153);
    _tipLabel.backgroundColor=[UIColor clearColor];
    [self addSubview:_tipLabel];
    
    
    _tipImgV=[[UIImageView alloc]init];
    _tipImgV.image=[UIImage imageNamed:@"为空图标"];
    _tipImgV.frame=CGRectMake(ScreenWidth/2-50, self.frame.size.height/2-45-64, 100, 90);
    [self addSubview:_tipImgV];
}

-(void)setTipLabelStr:(NSString *)tipLabelStr
{
    _tipLabelStr = tipLabelStr;
    self.tipLabel.text = _tipLabelStr;
}

-(void)setImg:(UIImage *)img
{
    _img = img;
    self.tipImgV.image = _img;
}

@end
